using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Beaglebits.Games.Netris
{
    public partial class InputForm : Form
    {
        string nickname;

        public string Nickname
        {
            get { return nickname; }
            set { nickname = value; }
        }
       
        

        public InputForm()
        {
            InitializeComponent();
        }

        private void btnSubmit_Click(object sender, EventArgs e)
        {
            this.lblError.Text = "";
            if (this.txtNickname.Text.Length < 4)
            {
                this.lblError.Text = "*";
            }
            else
            {
                this.nickname = this.txtNickname.Text;
                this.DialogResult = DialogResult.OK;
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
}